<form onsubmit="return(add(this))" method="post" action="javascript:alert('表单没有验证!')">

<div class="bodytabdiv">
<table class='bodytab' cellspacing='1'>
<tr>
	<th class='th' colspan='2'>{-if $L.id-}修改{-else-}添加{-/if-}模块节点</th>
</tr>


<tr>
	<td width="120">父节点</td>
	<td>{-$P.nodeName-}</td>
</tr>



<tr>
 <td>节点类型</td>
 <td>
	{-$nodes[$P.childType]-}
 </td>
</tr>

<tr>
	<td>节点值</td>
	<td><input name="nodeValue" value='{-$L.nodeValue-}' size='24' maxlength='24'></td>
</tr>

<tr>
	<td>节点描述</td>
	<td><input name="nodeName" value='{-$L.nodeName-}' size='24' maxlength='24'></td>
</tr>


<tr>
	<td >优先级</td>
	<td><input name='orderId' value='{-$L.orderId|default:'0'-}' size='2' maxlength='2'></td>
</tr>

</table>
</div>


<input type='hidden' name='jurl' value='{-$_ENV.referer-}'>

<div class='bodysubmit'>
<input type='submit' value='递交'>
<input type='reset' value='默认'>
</div>

</form>

<div class='bodyfooter'>
	<a href='{-$_ENV.referer-}'>返回</a>
</div>

<script type="text/javascript">
var isp=false;
function add(f){
	if(isp) {alert('表单已经递交!');return false;}



	var e=f.elements['nodeValue'];	if(!e.value.match(/^[\w\.\-]{2,24}$/)){
		alert('节点值不能为空,请输入不少于2个的字母!');	e.select();e.focus(); return false;
	}


	var e=f.elements['nodeName'];	if(!e.value.match(/^([^\x00-\xff]|\w){1,12}$/)){
		alert('节点描述不能为空和包含特殊字符,请输入不少于2个的字符!');	e.select();e.focus(); return false;
	}


	var e = f.elements['orderId']; if( !e.value.match(/^\d{1,2}$/)){
		alert('优先级只能是不大于100的数字'); e.select(); e.focus(); return false;
	}

	f.action="{-$body.url-}&act={-if $L.id-}eok&id={-$L.id-}{-else-}aok{-/if-}";
	isp=true;
	return true;
}
</script>